import React, { Component } from 'react'
import router from '../../App.module.css';
import { Link } from 'react-router-dom';
export default class Nav extends Component {
  state={
    navArr:[{id:0,name:'About'},{id:1,name:'Home'}],
    mouse:false
  }
/*   handleMouseOver =(event) => {
    console.log('进来了');
    return () => { 
        this.setState({mouse:event})
     }
  } */
  render() {
    return (
        <div className={router.routerNav}>
          <Link className={router.navItem} to="/about">About</Link>
          <Link className={router.navItem} to="/home">Home</Link>
        </div>
     /*  <div className={`${router.routerNav}` }>
        {
          navArr.map(i => { 
            return <div style={{backgroundColor:mouse?'#ddd':'white'}} onMouseOver={this.handleMouseOver(true)} onMouseLeave={this.handleMouseOver(false)} className={router.navItem} key={i.id}>
              {i.name}
            </div>
           })
        }
      </div> */
    )
  }
}
